package cp3120.dao;

import cp3120.model.Airport;
import cp3120.model.Flight;
import cp3120.model.FlightSearch;
import java.util.List;

/**
 *
 * @author Adam Scarr <scarr.adam@gmail.com>
 */
public interface FlightDAO {
    /**
     * gets a flight
     * @param flightID the ID of the flight to be retrieved
     * @return the flight
     */
    public Flight getFlight(int flightID);

    /**
     * gets a list of all flights
     * @return a list of flights
     */
    public List<Flight> getFlights();

    /**
     * gets a lsit of flights that match the search paramaters
     * @param search the paramaters to search for
     * @return a list of flights
     */
    public List<Flight> searchFlights(FlightSearch search);

    /**
     * updates a flight
     * @param flight the updated flight
     * @return  ture if updated
     */
    public boolean updateFlight(Flight flight);

    /**
     * adds a flight
     * @param flight the new flight to be added
     * @return true if added
     */
    public boolean addFlight(Flight flight);

    /**
     * deletes a flight
     * @param flight the flight to be deleted
     * @return true if the flight is deleted
     */
    public boolean deleteFlight(Flight flight);

    /**
     * gets an airport
     * @param airportID the ID of the airport to be retrieved
     * @return the airport
     */
    public Airport getAirport(int airportID);

    /**
     * gets a lsit of all airports
     * @return a lsit of airports
     */
    public List<Airport> getAirports();

    /**
     * updates an airport
     * @param airport the updated airport
     * @return true if updated
     */
    public boolean updateAirport(Airport airport);

    /**
     * adds an airport
     * @param airport the new airport to be added
     * @return true if added
     */
    public boolean addAirport(Airport airport);

    /**
     * deletes an airport
     * @param airport the airport to be deleted
     * @return true if deleted
     */
    public boolean deleteAirport(Airport airport);
}
